< previous page page_240 next page >

Page 240
Chapter Objectives
Learn about the different methods for getting at data
Learn to get data from a Microsoft Access database
Be able to hook up the data control to data-aware controls
Be able to create a form that adds, edits, and deletes data from a table
Sample Project File: \Chapter12\ADODataControl.vbp
Getting at Data
You have three primary methods for manipulating data in a database using the Visual Basic language. You can use the Jet engine, the Remote Data Objects, and ADO. Each of these different data access methods has both a data control interface and an object interface. In this chapter, youll learn about the ADO data control as one of the methods. In future chapters, youll learn about other methods. Lets start out with an overview of each of the primary methods of data manipulation.
The Jet Engine
The Jet engine is the same engine that powers Microsoft Access. Jet is a very powerful engine for getting at ISAM (Indexed Sequential Access Method) files such as a Jet MDB. An MDB file is an Access database. This is the file extension that is assigned to these Access/Jet database files. It also has the capability to get at database servers that are ODBC (Open Database Connectivity) compliantfor example, SQL Server, Oracle, Sybase, and others. Jet is much more efficient at getting at ISAM-type databases rather than database servers. You should only use Jet if you inherit a legacy application and Jet is already being used. Jet should also only be used if youre only going to use a Jet MDB and will never use a database server.
You have the option of using a Jet data control or the Jet Data Access Objects (DAO) from Visual Basic. The Jet data control uses the Jet DAO objects for all its accesstheyre just wrapped up into a custom control to make them easier to use. Jet also has a new added feature called ODBC Direct to help you speed up the data access to an ODBC data source such as SQL Server. The ODBC Direct layer is actually a component that sits on top of RDO, which youll learn about in the next section. ODBC Direct was developed to take legacy Visual Basic applications using Jet against an ODBC data source and convert them to a faster data access method. Figure 12.1 shows the different methods you can use with Jet to get at data.

 
< previous page page_240 next page >

If you like this book, buy it!